package com.yu.newsSys.utils;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringUtils {
    private static final ClassPathXmlApplicationContext context;
    static {
        context = new ClassPathXmlApplicationContext("spring1.xml");
    }
    public static Object getBean(Class<?> clazz) {
        return context.getBean(clazz);
    }
}
